<%@ page pageEncoding="utf-8" %>
<%@include file="/commons/taglibs.jsp" %>
<!DOCTYPE html>
<html>
<fmt:bundle basename="res">
<head>
    <meta charset="utf-8">
    <title><fmt:message key='lb' /></title>
    <jsp:include page="/WEB-INF/commons/commons-header.jsp" flush="true"/>
</head>
<body>

<div class="layui-fluid">
    <div class="layui-card">
        <div class="layui-form layui-card-header layuiadmin-card-header-auto">

            <div class="layui-form-item">
                <form name="totalForm" id="totalForm" action="${web_domain}/merchant/groupBooking/order/list" method="get">

                    <%--<div class="layui-inline">--%>
                    <%--<label class="layui-form-label">商品名称</label>--%>
                    <%--<div class="layui-input-inline">--%>
                    <%--<input type="text" name="name" placeholder="请输入商品名称" value="<c:if test='${params.name !=null}'>${params.name}</c:if>" autocomplete="off" class="layui-input">--%>
                    <%--</div>--%>
                    <%--</div>--%>

                    <div class="layui-inline">
                        <label class="layui-form-label"><fmt:message key='ptbh' /></label>
                        <div class="layui-input-inline">
                            <input type="text" name="groupBookingNo" placeholder="请输入拼团编号" value="<c:if test='${params.groupBookingNo !=null}'>${params.groupBookingNo}</c:if>" autocomplete="off" class="layui-input">
                        </div>
                    </div>

                    <!-- 需要排序的字段 -->
                    <%--<input type="hidden" class="feijin-orderby" name="orderByCreateTime" id="orderByCreateTimeParams" value="${params.orderByCreateTime}"/>--%>
                    <%--<input type="hidden" class="feijin-orderby" name="orderByStore" id="orderByStoreParams" value="${params.orderByStore}"/>--%>
                    <%--<input type="hidden" class="feijin-orderby" name="orderByPrice" id="orderByPriceParams" value="${params.orderByPrice}"/>--%>
                    <%--<input type="hidden" class="feijin-orderby" name="orderBySalesVolume" id="orderBySalesVolumeParams" value="${params.orderBySalesVolume}"/>--%>
                    <!-- 需要排序的字段 -->
                    <input type="hidden" name="status" value="${params.status}"/>

                    <div class="layui-inline">
                        <button class="layui-btn layui-btn-sm layuiadmin-btn-list" id="search"><i class="layui-icon layui-icon-search layuiadmin-button-btn"></i> <fmt:message key='ss' /></button>
                    </div>
                </form>
            </div>
        </div>

    </div>

    <div class="layui-card">
        <div class="layui-field-box layui-form">

            <%--<div class="layui-tab layui-tab-brief" lay-filter="docDemoTabBrief">--%>
            <%--<ul class="layui-tab-title">--%>
            <%--<li--%>
            <%--<c:if test="${params.groupBookingStatus eq 0}">class="layui-this"</c:if> >--%>
            <%--<a href="${web_domain}/merchant/groupBooking/list"--%>
            <%--<c:if test="${params.groupBookingStatus eq 0}">style="color: rgb(0, 150, 136)"</c:if> >全部</a>--%>
            <%--</li>--%>
            <%--<li <c:if test="${params.groupBookingStatus eq 1}">class="layui-this"</c:if>>--%>
            <%--<a href="${web_domain}/merchant/groupBooking/list?groupBookingStatus=1" <c:if test="${params.groupBookingStatus eq 1}">style="color: rgb(0, 150, 136)"</c:if>>待审核</a>--%>
            <%--</li>--%>
            <%--<li <c:if test="${params.groupBookingStatus eq 2}">class="layui-this"</c:if>>--%>
            <%--<a href="${web_domain}/merchant/groupBooking/list?groupBookingStatus=2" <c:if test="${params.groupBookingStatus eq 2}">style="color: rgb(0, 150, 136)"</c:if>>审核中</a>--%>
            <%--</li>--%>
            <%--<li <c:if test="${params.groupBookingStatus eq 3}">class="layui-this"</c:if>>--%>
            <%--<a href="${web_domain}/merchant/groupBooking/list?groupBookingStatus=3" <c:if test="${params.groupBookingStatus eq 3}">style="color: rgb(0, 150, 136)"</c:if>>审核通过</a>--%>
            <%--</li>--%>
            <%--<li <c:if test="${params.groupBookingStatus eq 4}">class="layui-this"</c:if>>--%>
            <%--<a href="${web_domain}/merchant/groupBooking/list?groupBookingStatus=4" <c:if test="${params.groupBookingStatus eq 4}">style="color: rgb(0, 150, 136)"</c:if>>审核不通过</a>--%>
            <%--</li>--%>
            <%--<li <c:if test="${params.groupBookingStatus eq 5}">class="layui-this"</c:if>>--%>
            <%--<a href="${web_domain}/merchant/groupBooking/list?groupBookingStatus=5" <c:if test="${params.groupBookingStatus eq 5}">style="color: rgb(0, 150, 136)"</c:if>>活动进行中</a>--%>
            <%--</li>--%>
            <%--<li <c:if test="${params.groupBookingStatus eq 6}">class="layui-this"</c:if>>--%>
            <%--<a href="${web_domain}/merchant/groupBooking/list?groupBookingStatus=6" <c:if test="${params.groupBookingStatus eq 6}">style="color: rgb(0, 150, 136)"</c:if>>活动结束</a>--%>
            <%--</li>--%>
            <%--<li <c:if test="${params.groupBookingStatus eq 7}">class="layui-this"</c:if>>--%>
            <%--<a href="${web_domain}/merchant/groupBooking/list?groupBookingStatus=7" <c:if test="${params.groupBookingStatus eq 7}">style="color: rgb(0, 150, 136)"</c:if>>已下架</a>--%>
            <%--</li>--%>
            <%--</ul>--%>
            <%--</div>--%>

            <table class="layui-table" lay-size="sm">
                <thead>
                <%--<th width="5%"><input id="checkboxs" type="checkbox" value="${item.id}" lay-ignore lay-skin="primary"/></th>--%>
                <th><fmt:message key='ptbh' /></th>
                <th><fmt:message key='spmc' /></th>
                <th><fmt:message key='ptjg' /></th>

                <th><fmt:message key='tznc' /></th>
                <th><fmt:message key='tzsjh' /></th>
                <th><fmt:message key='ktsj' /></th>
                <th><fmt:message key='ctrs' /></th>
                <th><fmt:message key='cantrs' /></th>
                <th><fmt:message key='ctzt' /></th>
                <th><fmt:message key='sfct' /></th>
                <th><fmt:message key='cz' /></th>
                </thead>
                <c:forEach items="${page.result}" var="item" varStatus="status">
                    <tr>
                            <%--<td><input type="checkbox" value="${item.id}" class="feijin-check" lay-ignore lay-skin="primary"/></td>--%>
                        <td>${item.groupBookingNo }</td>
                        <td>${item.sku.goods.name }</td>
                        <td><fmt:formatNumber value="${item.sku.groupBookingPrice}" type="CURRENCY"/></td>
                        <td>${item.member.nickname }</td>
                        <td>${item.member.mobile }</td>
                        <td>${item.createTime }</td>
                        <td>${item.groupBookingCondition }</td>
                        <td>${item.groupBookingTotal }</td>
                        <td>
                            <c:choose>
                                <c:when test="${item.status eq 1}"><fmt:message key='ptz' /></c:when>
                                <c:when test="${item.status eq 2}"><fmt:message key='ptcg' /></c:when>
                                <c:when test="${item.status eq 3}"><fmt:message key='ptsb' /></c:when>
                            </c:choose>
                        </td>
                                <td>
                                    <c:choose>
                                        <c:when test="${item.groupBookingCondition == item.groupBookingTotal}"><fmt:message key='s' /></c:when>
                                        <c:otherwise><fmt:message key='f' /></c:otherwise>
                                    </c:choose>
                                </td>



                        <td>
                            <div class="layui-btn-container">

                                <a href="javascript:void(0);" data-id="${item.id}" class="layui-btn layui-btn-xs feijin-detail"><fmt:message key='ck' /></a>
                            </div>
                        </td>
                    </tr>
                </c:forEach>
            </table>
            <jsp:include page="/commons/page.jsp" flush="true"/>
        </div>
    </div>

</div>

<script>

    $(function () {

//        //全选反选
//        $("#checkboxs").click(function () {
//            if (this.checked) {
//                $(".feijin-check:checkbox").prop("checked", true);
//            } else {
//                $(".feijin-check:checkbox").prop("checked", false);
//            }
//        });


        layui.use(['form', 'laydate'], function () {

            var form = layui.form;
            var laydate = layui.laydate;

        });

        //查看详情
        $(".feijin-detail").click(function () {

            var id = $(this).attr("data-id");

            layer.open({
                type: 2
                , title: '<fmt:message key='ckxq' />'
                , content: '${web_domain}/merchant/groupBooking/order/' + id + '/detail'
                , maxmin: true
                , area: ['97%', '97%']
                , btn: ['<fmt:message key='fh' />']
            });
        });

    });
</script>
</body>
</fmt:bundle>
</html>
